package com.shenmazong.demoaop001.controller;

import com.shenmazong.demoaop001.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: demo-aop-001
 * @description: UserController
 * @author: 亮子说编程
 * @create: 2021-01-23 20:28
 **/

@RestController
@Slf4j
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping(value = "/getUser")
    public String getUser() {
        log.info("-->UserController.getUser");
        return userService.getUser();
    }

    @RequestMapping(value = "/getMoney")
    public String getMoney() {
        log.info("-->UserController.getMoney");
        return userService.getMoney();
    }
}
